package leetcode.other;

/**
 * @author cyt
 * @create 2020-07-22 9:12
 */
public class offer11 {

    public static void main(String[] args) {
        int ans = 0;
    }

    public int minArray(int[] numbers) {
        int ans = 0;
        for (int i = 0; i < numbers.length; i++) {
            for (int j = i + 1; j < numbers.length; j++) {
                if (numbers[i] > numbers[j]) {
                    ans = numbers[i];
                    numbers[i] = numbers[j];
                    numbers[j] = ans;
                }
            }
        }
        return numbers[0];
    }
}
